package com.niiwoo.civet.system.enums;

import lombok.AllArgsConstructor;

/**
 * 系统参数类型
 * Created by fushengcai on 2017/10/28.
 */
@AllArgsConstructor
public enum SysParamTypeEnum {
    /**
     * 邮件服务
     */
    EMAIL("E","email"),
    /**
     * 上传文件服务
     */
    CONFIG("C","config"),
    /**
     * IM接口
     */
    IM("I","im"),
    /**
     * 短信网关
     */
    SMS("S","sms"),
    /**
     * 极光推送
     */
    JPUSH("J","jpush"),
    /**
     * 全局配置
     */
    GLOBAL("G","global");

    private String sign;

    private String value;

    public String getValue() {
        return value;
    }

    public String getSign() {
         return sign;
    }

    public static SysParamTypeEnum enumValueOf(String value) {
        for (SysParamTypeEnum param : values()) {
            if (param.value.equals(value)) {
                return param;
            }
        }
        return null;
    }

    public static SysParamTypeEnum signOf(String sign) {
        for (SysParamTypeEnum param : values()) {
            if (param.sign.equals(sign)) {
                return param;
            }
        }
        return null;
    }





}
